<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArRunningAverage Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArRunningAverage.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArRunningAverage-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArRunningAverage Class Reference<div class="ingroups"><a class="el" href="group__UtilityClasses.html">Utility Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Use for computing a running average of a number of elements.  
 <a href="classArRunningAverage.html#details">More...</a></p>

<p><code>#include &lt;ariaUtil.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a98468ca693f4a536b946c94d4b179d54"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a98468ca693f4a536b946c94d4b179d54"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#a98468ca693f4a536b946c94d4b179d54">add</a> (double val)</td></tr>
<tr class="memdesc:a98468ca693f4a536b946c94d4b179d54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a value to the average. An old value is discarded if the number of elements to average has been reached. <br /></td></tr>
<tr class="separator:a98468ca693f4a536b946c94d4b179d54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1001745c9f7f1bcb4cd2db3a2a0c360"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab1001745c9f7f1bcb4cd2db3a2a0c360"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#ab1001745c9f7f1bcb4cd2db3a2a0c360">ArRunningAverage</a> (size_t numToAverage)</td></tr>
<tr class="memdesc:ab1001745c9f7f1bcb4cd2db3a2a0c360"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, give it the number of elements to store to compute the average. <br /></td></tr>
<tr class="separator:ab1001745c9f7f1bcb4cd2db3a2a0c360"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50e2ff5e20c19fbebc0a6a6a85677e1f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a50e2ff5e20c19fbebc0a6a6a85677e1f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#a50e2ff5e20c19fbebc0a6a6a85677e1f">clear</a> (void)</td></tr>
<tr class="memdesc:a50e2ff5e20c19fbebc0a6a6a85677e1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the average. <br /></td></tr>
<tr class="separator:a50e2ff5e20c19fbebc0a6a6a85677e1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3531e6d6f8307cacd602e6d1e9dca9e1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3531e6d6f8307cacd602e6d1e9dca9e1"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#a3531e6d6f8307cacd602e6d1e9dca9e1">getAverage</a> (void) const </td></tr>
<tr class="memdesc:a3531e6d6f8307cacd602e6d1e9dca9e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the average. <br /></td></tr>
<tr class="separator:a3531e6d6f8307cacd602e6d1e9dca9e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87c28af9b2c7052addad52f2366b2481"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a87c28af9b2c7052addad52f2366b2481"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#a87c28af9b2c7052addad52f2366b2481">getCurrentNumAveraged</a> (void)</td></tr>
<tr class="memdesc:a87c28af9b2c7052addad52f2366b2481"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of values currently averaged so far. <br /></td></tr>
<tr class="separator:a87c28af9b2c7052addad52f2366b2481"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0478d90bafca360071acbf971d2e925b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0478d90bafca360071acbf971d2e925b"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#a0478d90bafca360071acbf971d2e925b">getNumToAverage</a> (void) const </td></tr>
<tr class="memdesc:a0478d90bafca360071acbf971d2e925b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of elements. <br /></td></tr>
<tr class="separator:a0478d90bafca360071acbf971d2e925b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3022a88c4bdb6fe75f809a537fc4041"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa3022a88c4bdb6fe75f809a537fc4041"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#aa3022a88c4bdb6fe75f809a537fc4041">getUseRootMeanSquare</a> (void)</td></tr>
<tr class="memdesc:aa3022a88c4bdb6fe75f809a537fc4041"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets if this is using a the root mean square average or just the normal average. <br /></td></tr>
<tr class="separator:aa3022a88c4bdb6fe75f809a537fc4041"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8733b0aa814fe4ab4f3d1e8690b1531"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae8733b0aa814fe4ab4f3d1e8690b1531"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#ae8733b0aa814fe4ab4f3d1e8690b1531">setNumToAverage</a> (size_t numToAverage)</td></tr>
<tr class="memdesc:ae8733b0aa814fe4ab4f3d1e8690b1531"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number of elements. <br /></td></tr>
<tr class="separator:ae8733b0aa814fe4ab4f3d1e8690b1531"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad26e7bb88df16e4aab633cc2405953fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad26e7bb88df16e4aab633cc2405953fc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#ad26e7bb88df16e4aab633cc2405953fc">setUseRootMeanSquare</a> (bool useRootMeanSquare)</td></tr>
<tr class="memdesc:ad26e7bb88df16e4aab633cc2405953fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if this is using a the root mean square average or just the normal average. <br /></td></tr>
<tr class="separator:ad26e7bb88df16e4aab633cc2405953fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04a523542487605311c86a7622f0f853"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a04a523542487605311c86a7622f0f853"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRunningAverage.html#a04a523542487605311c86a7622f0f853">~ArRunningAverage</a> ()</td></tr>
<tr class="memdesc:a04a523542487605311c86a7622f0f853"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a04a523542487605311c86a7622f0f853"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a96d511e863ade1ff37d07497e2032ad4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96d511e863ade1ff37d07497e2032ad4"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>myNum</b></td></tr>
<tr class="separator:a96d511e863ade1ff37d07497e2032ad4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43151b358849ece1bb47a142c5d8c194"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a43151b358849ece1bb47a142c5d8c194"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>myNumToAverage</b></td></tr>
<tr class="separator:a43151b358849ece1bb47a142c5d8c194"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87938f2680c5527848e7b80d26cb09de"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a87938f2680c5527848e7b80d26cb09de"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myTotal</b></td></tr>
<tr class="separator:a87938f2680c5527848e7b80d26cb09de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f78aae41851425acf2cee6f845548fa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0f78aae41851425acf2cee6f845548fa"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myUseRootMeanSquare</b></td></tr>
<tr class="separator:a0f78aae41851425acf2cee6f845548fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ed9b9141dc7f67a75a199ef21bbe9c0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ed9b9141dc7f67a75a199ef21bbe9c0"></a>
std::list&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myVals</b></td></tr>
<tr class="separator:a4ed9b9141dc7f67a75a199ef21bbe9c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Use for computing a running average of a number of elements. </p>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li>ariaUtil.h</li>
<li>ariaUtil.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArRunningAverage.html">ArRunningAverage</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
